import { RouteRecordRaw } from 'vue-router'
export const constantRoute: RouteRecordRaw[] = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/login/index.vue'),
    },
    {
        path: '/register',
        name: 'regitser',
        component: () => import('@/views/register/index.vue'),
    },
    {
        path: '/layout',
        name: 'layout',
        redirect: 'home',
        component: () => import('@/layout/index.vue'),
        children: [
            {
                path: '/home',
                name: 'home',
                meta: {
                    title: '个人主页',
                },
                component: () => import('@/views/student/home/index.vue'),
            },
            {
                path:'/choose-course',
                name: 'choose-course',
                meta: {
                    title: '学生选课',
                },
                component: () => import('@/views/student/choose-course/index.vue'),
            },
            {
                path:'/my-course',
                name: 'my-course',
                meta: {
                    title: '学生课程',
                },
                component: () => import('@/views/student/my-course/index.vue'),
            },
            {
                path:'/my-class-table',
                name: 'my-class-table',
                meta: {
                    title: '学生课表',
                },
                component: () => import('@/views/student/my-class-table/index.vue'),
            },
        ]
    },
    {
        path: '/layout-teacher',
        name: 'layout-teacher',
        redirect: 'teacher-info',
        component: () => import('@/layout-teacher/index.vue'),
        children: [
            {
                path:'/teacher-courses',
                name: 'teacher-courses',
                meta: {
                    title: '教师所授课程',
                },
                component: () => import('@/views/teacher/teacher-courses/index.vue'),
            },
            {
                path:'/arrange-exam',
                name: 'arrange-exam',
                meta: {
                    title: '考试安排',
                },
                component: () => import('@/views/teacher/arrange-exam/index.vue'),
            },
            {
                path:'/teacher-addscore',
                name: 'teacher-addscore',
                meta: {
                    title: '教师录入成绩',
                },
                component: () => import('@/views/teacher/teacher-addscore/index.vue'),
            },
            {
                path:'/teacher-checkscore',
                name: 'teacher-checkscore',
                meta: {
                    title: '教师录入成绩',
                },
                component: () => import('@/views/teacher/teacher-checkscore/index.vue'),
            },
            {
                path: '/teacher-info',
                name: 'teacher-info',
                meta: {
                    title: '个人主页',
                },
                component: () => import('@/views/teacher/teacher-info/index.vue'),
            },

        ]
    },

]
export const asyncRoute: RouteRecordRaw[] = []
export const anyRoute: RouteRecordRaw[] = [
    // {
    //     //任意路由
    //     path: '/:pathMatch(.*)*',
    //     redirect: '/404',
    //     name: 'Any',
    //     meta: {
    //         title: '任意路由',
    //         hidden: true,
    //         icon: 'DataLine',
    //     },
    // },
]
